package com.bosssoft.goods.domain.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * 商品分类列表对象
 * @author Fang_Sir
 * @date 2021-04-13
 */
@Getter
@Setter
@ToString
public class CategoryListVO {
    @ApiModelProperty("分类ID")
    @JsonProperty("cat_id")
    private int id;

    @ApiModelProperty(value = "分类父ID",allowableValues="0,1")
    @JsonProperty("cat_pid")
    private int pid;

    @ApiModelProperty("分类名称")
    @JsonProperty("cat_name")
    private String name;

    @ApiModelProperty(value = "分类层级",allowableValues="0,1,2")
    @JsonProperty("cat_level")
    private int level;

    @ApiModelProperty("子类列表")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<CategoryListVO> children;
}
